//
//  subViewController.m
//  sleepTest2
//
//  Created by apple on 2017/8/6.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "subViewController.h"
// 宏定义颜色
#define bgColor [UIColor colorWithRed:34/255.0 green:38/255.0 blue:65/255.0 alpha:1]
#define lightBlueColor [UIColor colorWithRed:113/255.0 green:123/255.0 blue:172/255.0 alpha:1]
#define whiteBlueColor [UIColor colorWithRed:188/255.0 green:195/255.0 blue:232/255.0 alpha:1]

@interface subViewController ()

@end

@implementation subViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    // 设置标题和背景颜色：
    self.title = @"提交";
    self.view.backgroundColor = bgColor;
    
    // 初始化一个返回按钮
    UIButton *returnBtn = [[UIButton alloc] initWithFrame:CGRectMake([UIScreen mainScreen].bounds.size.width/3, 200, [UIScreen mainScreen].bounds.size.width/3, 35)];
    // 按钮名字
    [returnBtn setTitle:@"返回" forState:UIControlStateNormal];
    // 颜色
    [returnBtn setTitleColor:whiteBlueColor forState:UIControlStateNormal];
    // 跳转
    [returnBtn addTarget:self action:@selector(dismissAction) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:returnBtn];
}

// 返回按钮点击事件
- (void)dismissAction{
    [self dismissViewControllerAnimated:YES completion:nil];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
